var pageLayout, centerTabsLayout, centerAccordionLayout; 


function resizeEverything () {
	// All layout 'panes'
	pageLayout.resizeAll();
};


$(document).ready(function () {

	// OUTER/PAGE LAYOUT
	pageLayout = $("body").layout(); 



	// LAYOUT TO CONTAIN TABS IN OUTER-CENTER PANE
	centerTabsLayout = $("body > .ui-layout-center").layout({
		closable:				false
	,	resizable:				false
	,	spacing_open:			0
	});
	// TABS - CENTER
	$("#tabs-center").tabs();
	$("#tabs-inside-tab-1").tabs();
	$("#tabs-inside-tab-2").tabs();
	$("#tabs-inside-tab-3").tabs();

	centerTabsLayout.resizeAll(); // resize layout after creating tabs

	// INIT ACCORDION - EVEN THOSE NOT VISIBLE
	$("#accordion-center")	.accordion({ fillSpace: true });
});